These modifiers allow you to customize how rows and sections behave and appear inside a <List> component.
<Text>, <HStack>, etc. inside <List>)<Section>)<List> component itselflistItemTintSets the tint color applied to the row or its accessories (e.g., icons, buttons).
null to avoid overriding the inherited tint.listRowInsetsApplies padding (insets) to a row in a list.
number to apply uniform padding.EdgeInsets object to apply individual insets for top, bottom, leading, and trailing.listRowSpacingControls the vertical spacing between adjacent rows.
listRowSeparatorSets the visibility of the separator line for a specific row.
Visibility options:"visible" – Always show the separator"hidden" – Hide the separator"automatic" – System default behaviorVerticalEdgeSet options:"top" | "bottom" | "all"listRowSeparatorTintSets the tint color of the separator for a specific row.
listRowBackgroundPlaces a custom background behind a list row.
listSectionSpacingControls the spacing between adjacent list sections.
ListSectionSpacing options:"default" – System default spacing"compact" – Smaller spacingnumber – Custom spacing in pointslistSectionSeparatorControls the visibility of the separator between list sections.
listSectionSeparatorTintSets the separator tint color for a section.
EdgeInsetsVisibilityVerticalEdgeSetColor formatsYou can define color in three ways:
"green", "label", etc."#ff0000""rgba(255,0,0,1)"| Modifier | Scope | Description |
|---|---|---|
listItemTint |
Row | Sets tint color for row content |
listRowInsets |
Row | Custom padding for row |
listRowSpacing |
List | Vertical spacing between rows |
listRowSeparator |
Row | Controls row separator visibility |
listRowSeparatorTint |
Row | Tint color of row separator |
listRowBackground |
Row | Background behind a specific row |
listSectionSpacing |
List | Spacing between sections |
listSectionSeparator |
Section | Visibility of section separator |
listSectionSeparatorTint |
Section | Tint color of section separator |